package mmc.action.skill;

import mmc.server.RemoteClient;

public class Bomb extends Skill {

	public Bomb(){
		super("Bomb", "mmc/resource/data/bomb-4.png", 1);
		this.needTarget = false;
	}


	@Override
	public void endCast(RemoteClient client) {
		mmc.server.Player player = client.getPlayer();
		 
		float v = 10;
		float vx = (float) Math.sin(Math.toRadians(player.yaw));
		float vz = -(float) Math.cos(Math.toRadians(player.yaw));
		
		client.getServer().getScene().addObject(new mmc.objects.Bomb(player.x,player.y+1.99f,player.z,player.vx+vx*v,player.vy+v,player.vz+vz*v));
	}
}
